#!/usr/bin/php
<?PHP


$val = 67;

$g = 9999;

function test($a = 123)
{
    static $s = 10;
    // global $g;
    // echo "g = $g\n";
    // $g = 1000;
    //
    // echo "val = $val\n";
    //
    echo "s = $s\n";
    echo "a = $a\n";
    $a++;
    $s++;
}

for ($i = 0; $i < 10; $i++) {
    test();
}

echo "main g = $g\n";
// echo "main s = $s\n";
// echo "main a = $a\n";

